
import { kebabCase } from "lodash-es";
import { themeColorList } from '@/utils';

export function setThemeColor(color: string){
  const colorKeys = Object.keys(themeColorList);
  const style: string[] = [];
  colorKeys.forEach((key) => {
    style.push(`--${kebabCase(key)}:${themeColorList[key](color)}`);
  });
  document.documentElement.style.cssText = style.join(';');
}

